<!-- quirks -->
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"/>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta name="renderer" content="webkit"/>
	<title>数学函数</title>
	<link href="../../ting-quirks.css" rel="stylesheet"/>
	<!--[if lt IE 9]><script src="../../dist/sky-compat.js"></script><![endif]-->
	<!--[if gte IE 9]><!--><script src="../../dist/sky-modern.js"></script><!--><![endif]-->
	<script src="../../demo.js"></script>
</head>
<body>
<div class="container-fluid">
	<h2>数学函数</h2>
	<h3 id="round">Sky.round</h3>
	<p>四舍五入</p>
<pre class="code">Sky.round(4.006);
// => 4

Sky.round(4.006, 2);
// => 4.01

Sky.round(4060, -2);
// => 4100</pre>
	<h3 id="ceil">Sky.ceil</h3>
	<p>进一法</p>
<pre class="code">Sky.ceil(4.006);
// => 5

Sky.ceil(6.004, 2);
// => 6.01

Sky.ceil(6040, -2);
// => 6100</pre>
	<h3 id="floor">Sky.floor</h3>
	<p>去尾法</p>
<pre class="code">Sky.floor(4.006);
// => 4

Sky.floor(0.046, 2);
// => 0.04

Sky.floor(4060, -2);
// => 4000</pre>
	<h3 id="random">Sky.random</h3>
	<p>整数随机数</p>
<pre class="code">Sky.random(2,5);
// => 2 3 4 5</pre>
</div>
</body>
</html>